setGlobalDuration(-1)

randomh(bus='pit', mini=.5, maxi=2, rate=.5)

sine(amplitude=.5, pitchVar='pit', out='s')

oscReceive(bus=['trig', 'clear'], address=['/trig', '/clear'], port=8000)

infiniteReverb(input='s', trigbus='trig', clearbus='clear')

startCsound()

def tr():
    sendOscTrigger(value=1, address='/trig')

def cl():
    sendOscTrigger(value=1, address='/clear')

frame = beginGUI('Infinite Reverb', size=(160,60))
makeButton(frame, label='trig', pos=(10,10), function=tr)
makeButton(frame, label='clear', pos=(80,10), function=cl)
endGUI(frame)